package com.chen.spider.service.impl;

import com.chen.spider.dto.SpiderEntity;
import com.chen.spider.dto.SpiderMainPageEntity;
import com.chen.spider.mapper.SpiderMapper;
import com.chen.spider.service.SpiderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class SpiderServiceImpl implements SpiderService {

    @Resource
    private SpiderMapper spiderMapper;

    @Override
    public boolean insert(SpiderEntity spiderEntity) {
        return spiderMapper.insert(spiderEntity) > 0;
    }

    @Override
    public boolean insertMain(SpiderMainPageEntity spiderMainPageEntity) {
        return spiderMapper.insertMain(spiderMainPageEntity) > 0;
    }
    @Override
    public boolean isCount() {
        return spiderMapper.count()>0;
    }
    public int count(){
        return spiderMapper.count();
    }
}
